.section .data

.equ SYS_EXIT,  60

.section .text
.globl main

main:
    mov $SYS_EXIT, %rax
    mov $9, %rdi   # 保存返回值到第一个参数
    syscall        # 调用exit

# to run this file, follow the commands below
# $ gcc exit_gcc.s
# $ ./a.out 
# echo $?
# more info please see exit_as.s
